<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>YK Value-added System</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<link rel="stylesheet" type="text/css" href="css/admin.css" />
	<link rel="stylesheet" type="text/css" href="css/common.css" />
	<script src="js/json.js" type="text/javascript"></script>
	<script src="js/prototype.js" type="text/javascript"></script>
	<script src="<%=basePath%>js/Validator.js" type="text/javascript"></script>
	<script type="text/javascript" charset="utf-8" defer="defer" src="<%=basePath%>js/wdatepicker/WdatePicker.js"></script>
	<script src="<%=basePath%>js/appmgmt/degree.js" type="text/javascript"></script>
	<script type="text/javascript">
		function check(){
			if(document.getElementById("link.link_name").value==""){
				alert("生产线名称不能为空！");
				document.getElementById("link.link_name").focus();
				return false ;
			}
			if(!saveDegree()){
				return false;
			}
	        return true;
		}
	</script>
	
  </head>
  
  <body>
<table width="95%" border="0" align="center" cellspacing="0">
  <tr>
    <td height="30">
    	<table width="60%" border="0">
		     <tr>
		        	<td width="30"><img src="images/location_left.gif" width="24" height="30" /></td>
		        	<td>
		        		您当前的位置是：生产排期 -&gt;修改生产线<br>
		        	</td>
		    </tr>
		    <tr>
		         	<td colspan="2"><hr width="100%" align="left"></td>
			</tr>
	    </table>
    </td>
  </tr>
  <tr>
    <td><form id="form1" name="form1" method="post" action="<%=basePath%>admin/tongzhou/link!editLink.action" onsubmit="return check();">
      <table width="80%" border="0" cellspacing="3">
      	<tr>
          <td colspan="2"><font color="red" style="font-size:12px;"></font></td>
		</tr>
		<tr>
          <td width="100" align="right">
          	<span class="style">*</span>生产线名称：
          </td>
          <td>
          	<input type="text" style="width:250px" id="link.link_name" name="link.link_name" maxlength="30" value="${link.link_name}" style="height: 25px;"/>
          	<input type="hidden" style="width:250px" id="link.productSchedule_id" name="link.productSchedule_id" value="${productSchedule_id}"/>
          	<input type="hidden" style="width:250px" id="link.id" name="link.id" maxlength="30" value="${link.id}" style="height: 25px;"/>
          	<input type="hidden" style="width:250px" id="itemsVal" name="itemsVal" value=""/>
          </td>
        </tr>
        <tr>
       	  <td width="700px" align="left" colspan="2">
       	  		<table border="1" cellspacing="3" style="width:700px"  id="tabActive" name="tabActive">
       	  			<tr>
     	  				<th colspan="4"><big>度数列表</big><span class="style">(时间按序号从小到大)</span></th>
	          			<td colspan="1" align="right">
	          				<strong>其它配置信息</strong>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
	          				<a  onclick="addRow()" >新增</a>
	          					&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
	          				<a  onclick="delRow()"  >删除</a>
	          			</td>
	          		</tr>
       	  			<tr>
       	  				<td align="center"  width="5%"><strong>序号</strong></td>
       	  				<td align="center" width="5%"><strong>选择</strong></td>
         				<td align="center" width="30%"><strong>度名</strong></td>
          				<td align="center" width="30%" ><strong>开始时间</strong></td>
          				<td align="center" width="30%" ><strong>结束时间</strong></td>
       	  			</tr>
			        <s:iterator value="degreeResult" id="bean" status="flag">
			        	<tr>
	       	  				<td align="center" width="5%">${flag.index+1}</td>
	       	  				<td align="center"><input type="checkBox" id="num${flag.index+1}" name="num" value="${flag.index+1}"/></td>
	       	  				<td>
	          					<input type="text" style="width:150px" id="degree_name${flag.index+1}" name="degree_name" value="${bean.degree_name}" />
	          				</td>
	          				<td>
					          	<SELECT name="start_time_up" id="start_time_up${flag.index+1}" > 
					          		<option value='${bean.start_time_up}' selected>${bean.start_time_up} </option> 
									<%for(int i=0;i <=9;i++){ %> 
									<option value='0<%=i%>'> 0<%=i%> </option> 
									<%} %>	
									<%for(int i=10;i <=23;i++){ %> 
									<option value='<%=i%>'> <%=i%> </option> 
									<%} %>
								</SELECT>时&nbsp;
					          	到&nbsp;
					          	<SELECT name="start_time_down" id="start_time_down${flag.index+1}" > 
					          		<option value='${bean.start_time_down}' selected>${bean.start_time_down} </option> 
									<%for(int i=0;i <=9;i++){ %> 
									<option value='0<%=i%>'> 0<%=i%> </option> 
									<%} %>	
									<%for(int i=10;i <=60;i++){ %> 
									<option value='<%=i%>'> <%=i%> </option> 
									<%} %>		
								</SELECT>分
					         </td>
					         <td>
					          	<SELECT name="end_time_up" id="end_time_up${flag.index+1}" > 
					          		<option value='${bean.end_time_up}' selected>${bean.end_time_up} </option>
									<%for(int i=0;i <=23;i++){ %> 
									<option value='<%=i%>'> <%=i%> </option> 
									<%} %>	
								</SELECT>
					          	时&nbsp;
					          	到&nbsp;
					          	<SELECT name="end_time_down" id="end_time_down${flag.index+1}" > 
					          		<option value='${bean.end_time_down}' selected>${bean.end_time_down} </option>
									<%for(int i=0;i <=9;i++){ %> 
									<option value='0<%=i%>'> 0<%=i%> </option> 
									<%} %>	
									<%for(int i=10;i <=60;i++){ %> 
									<option value='<%=i%>'> <%=i%> </option> 
									<%} %>	
								</SELECT>分
					         </td>
	       	  			</tr>
			        </s:iterator>
       	  		</table>
          </td>
        </tr>
		<tr>
          <td colspan="2"><hr width="100%" align="left"></td>
		</tr>
        <tr>
          <td align="right" colspan="1"><input type="submit" name="Submit" value="修改" class="Button" /></td>
          <td colspan="1"><input type="button" name="Submit22" value="返回" class="Button"  onclick="window.location='<%=basePath%>admin/tongzhou/link!listLink.action?productSchedule_id=${link.productSchedule_id}'"/></td>
        </tr>
      </table>
        </form>
    </td>
  </tr>
</table>
</body>
</html>
